package com.example.springboot.controller;

import com.example.springboot.beans.Teacher;
import com.example.springboot.mapper.TeacherMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TeachController {
    @Autowired
    private TeacherMapper teacherMapper;
    @GetMapping("/teacher")
    public Teacher query(){
    return teacherMapper.getById(1);
}
}
